﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Net.Sockets;
using System.Runtime.Serialization;

namespace Mbs.Net
{
    [Serializable]
    public class NetException : Exception
    {
        public NetException() { }
        public NetException(SocketError error)
            : base(error.ToString())
        {
            SocketError = error;
        }
        public NetException(string message) : base(message) { }
        public NetException(string message, Exception innerException) : base(message, innerException) { }
        public NetException(SerializationInfo info, StreamingContext context) : base(info, context) { }

        public SocketError SocketError { get; set; }
    }

}
